using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
public sealed class frmVehicle : Form
{
	private string string_0 = string.Empty;
	private string string_1 = string.Empty;
	private string string_2 = string.Empty;
	private string string_3 = string.Empty;
	private int int_0;
	private bool bool_0;
	private string string_4 = string.Empty;
	private string string_5 = string.Empty;
	private string string_6 = string.Empty;
	private string string_7 = string.Empty;
	private IContainer icontainer_0;
	private Label label1;
	private Label label2;
	private TextBox txtPlateNumber;
	private TextBox txtOwnerName;
	private Label label3;
	private Label label4;
	private Label label5;
	private TextBox txtOwnerIDCard;
	private TextBox txtOwnerAddress;
	private TextBox txtDescription;
	private CheckBox chkIsBlacklist;
	private Button btnOK;
	private Button btnCancel;
	private Label label7;
	private Label label8;
	private Label label9;
	private ComboBox cbxProvince;
	private ComboBox cbxDistrict;
	private ComboBox cbxWard;
	public frmVehicle()
	{
		this.InitializeComponent();
		System.Drawing.Color.FromName(MainForm.SystemConfiguration_0.string_15);
		foreach (BO4 gClass in MainForm.SystemConfiguration_0.ExtendCollection0_0)
		{
			this.cbxProvince.Items.Add(gClass.method_2());
		}
	}
	public string method_0()
	{
		return this.string_0;
	}
	public void method_1(string string_8)
	{
		this.string_0 = string_8;
	}
	public string method_2()
	{
		return this.string_1;
	}
	public void method_3(string string_8)
	{
		this.string_1 = string_8;
	}
	public string method_4()
	{
		return this.string_2;
	}
	public void method_5(string string_8)
	{
		this.string_2 = string_8;
	}
	public string method_6()
	{
		return this.string_3;
	}
	public void method_7(string string_8)
	{
		this.string_3 = string_8;
	}
	public int method_8()
	{
		return this.int_0;
	}
	public void method_9(int int_1)
	{
		this.int_0 = int_1;
	}
	public bool method_10()
	{
		return this.bool_0;
	}
	public void method_11(bool bool_1)
	{
		this.bool_0 = bool_1;
	}
	public string method_12()
	{
		return this.string_4;
	}
	public void method_13(string string_8)
	{
		this.string_4 = string_8;
	}
	public void method_14(string string_8)
	{
		this.string_5 = string_8;
	}
	public void method_15(string string_8)
	{
		this.string_6 = string_8;
	}
	public void method_16(string string_8)
	{
		this.string_7 = string_8;
	}
	private void frmVehicle_Load(object sender, System.EventArgs e)
	{
		this.txtPlateNumber.Text = this.string_0;
		this.txtOwnerName.Text = this.string_1;
		this.txtOwnerIDCard.Text = this.string_2;
		this.txtOwnerAddress.Text = this.string_3;
		if (this.string_5 != string.Empty)
		{
			this.cbxProvince.Text = this.string_5;
		}
		if (this.string_6 != string.Empty)
		{
			this.cbxDistrict.Text = this.string_6;
		}
		if (this.string_7 != string.Empty)
		{
			this.cbxWard.Text = this.string_7;
		}
		BO2 gClass = MainForm.SystemConfiguration_0.gclass6_0.Find(this.int_0);
		if (gClass != null)
		{
			BO3 gClass2 = MainForm.SystemConfiguration_0.gclass8_0.Find(gClass.method_4());
			if (gClass2 != null)
			{
				BO4 gClass3 = MainForm.SystemConfiguration_0.ExtendCollection0_0.Find(gClass2.method_4());
				if (gClass3 != null)
				{
					this.cbxProvince.Text = gClass3.method_2();
					this.method_17();
					this.cbxDistrict.Text = gClass2.method_2();
					this.method_18();
					this.cbxWard.Text = gClass.method_2();
				}
			}
		}
		this.txtDescription.Text = this.string_4;
		this.chkIsBlacklist.Checked = this.bool_0;
		this.method_19();
	}
	private void method_17()
	{
		this.cbxDistrict.Enabled = false;
		this.cbxWard.Enabled = false;
		if (this.cbxProvince.Text != string.Empty)
		{
			this.cbxDistrict.Items.Clear();
			BO4 gClass = MainForm.SystemConfiguration_0.ExtendCollection0_0.Search(this.cbxProvince.Text);
			if (gClass != null)
			{
				foreach (BO3 gClass2 in MainForm.SystemConfiguration_0.gclass8_0)
				{
					if (gClass2.method_4() == gClass.method_0())
					{
						this.cbxDistrict.Items.Add(gClass2.method_2());
					}
				}
				if (this.cbxDistrict.Items.Count > 0)
				{
					this.cbxDistrict.SelectedIndex = 0;
					this.cbxDistrict.Enabled = true;
					BO3 gClass3 = MainForm.SystemConfiguration_0.gclass8_0.Search(gClass.method_0(), this.cbxDistrict.Text);
					if (gClass3 != null)
					{
						this.cbxWard.Items.Clear();
						foreach (BO2 gClass4 in MainForm.SystemConfiguration_0.gclass6_0)
						{
							if (gClass4.method_4() == gClass3.method_0())
							{
								this.cbxWard.Items.Add(gClass4.method_2());
							}
						}
						if (this.cbxWard.Items.Count > 0)
						{
							this.cbxWard.SelectedIndex = 0;
							this.cbxWard.Enabled = true;
						}
					}
				}
			}
		}
	}
	private void method_18()
	{
		this.cbxWard.Enabled = false;
		if (this.cbxProvince.Text != string.Empty && this.cbxDistrict.Text != string.Empty)
		{
			BO4 gClass = MainForm.SystemConfiguration_0.ExtendCollection0_0.Search(this.cbxProvince.Text);
			if (gClass != null)
			{
				BO3 gClass2 = MainForm.SystemConfiguration_0.gclass8_0.Search(gClass.method_0(), this.cbxDistrict.Text);
				if (gClass2 != null)
				{
					this.cbxWard.Items.Clear();
					foreach (BO2 gClass3 in MainForm.SystemConfiguration_0.gclass6_0)
					{
						if (gClass3.method_4() == gClass2.method_0())
						{
							this.cbxWard.Items.Add(gClass3.method_2());
						}
					}
					if (this.cbxWard.Items.Count > 0)
					{
						this.cbxWard.SelectedIndex = 0;
						this.cbxWard.Enabled = true;
					}
				}
			}
		}
	}
	private void cbxProvince_SelectedIndexChanged(object sender, System.EventArgs e)
	{
		this.method_17();
		this.method_19();
	}
	private void cbxDistrict_SelectedIndexChanged(object sender, System.EventArgs e)
	{
		this.method_18();
		this.method_19();
	}
	private void cbxWard_SelectedIndexChanged(object sender, System.EventArgs e)
	{
		this.method_19();
	}
	private void btnOK_Click(object sender, System.EventArgs e)
	{
		this.string_0 = this.txtPlateNumber.Text;
		this.string_1 = this.txtOwnerName.Text;
		this.string_2 = this.txtOwnerIDCard.Text;
		this.string_3 = this.txtOwnerAddress.Text;
		this.int_0 = -1;
		if (this.cbxProvince.Text != string.Empty && this.cbxDistrict.Text != string.Empty && this.cbxWard.Text != string.Empty)
		{
			BO4 gClass = MainForm.SystemConfiguration_0.ExtendCollection0_0.Search(this.cbxProvince.Text);
			if (gClass != null)
			{
				BO3 gClass2 = MainForm.SystemConfiguration_0.gclass8_0.Search(gClass.method_0(), this.cbxDistrict.Text);
				if (gClass2 != null)
				{
					BO2 gClass3 = MainForm.SystemConfiguration_0.gclass6_0.Search(gClass2.method_0(), this.cbxWard.Text);
					if (gClass3 != null)
					{
						this.int_0 = gClass3.method_0();
					}
				}
			}
		}
		this.string_4 = this.txtDescription.Text;
		this.bool_0 = this.chkIsBlacklist.Checked;
		base.DialogResult = DialogResult.OK;
		base.Close();
	}
	private void method_19()
	{
		this.btnOK.Enabled = (this.txtPlateNumber.Text != string.Empty && this.txtOwnerName.Text != string.Empty && this.txtOwnerAddress.Text != string.Empty && this.cbxWard.Text != string.Empty);
	}
	private void btnCancel_Click(object sender, System.EventArgs e)
	{
		base.Close();
	}
	private void txtOwnerAddress_TextChanged(object sender, System.EventArgs e)
	{
		this.method_19();
	}
	protected override void Dispose(bool disposing)
	{
		if (disposing && this.icontainer_0 != null)
		{
			this.icontainer_0.Dispose();
		}
		base.Dispose(disposing);
	}
	private void InitializeComponent()
	{
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmVehicle));
        this.label1 = new System.Windows.Forms.Label();
        this.label2 = new System.Windows.Forms.Label();
        this.txtPlateNumber = new System.Windows.Forms.TextBox();
        this.txtOwnerName = new System.Windows.Forms.TextBox();
        this.label3 = new System.Windows.Forms.Label();
        this.label4 = new System.Windows.Forms.Label();
        this.label5 = new System.Windows.Forms.Label();
        this.txtOwnerIDCard = new System.Windows.Forms.TextBox();
        this.txtOwnerAddress = new System.Windows.Forms.TextBox();
        this.txtDescription = new System.Windows.Forms.TextBox();
        this.chkIsBlacklist = new System.Windows.Forms.CheckBox();
        this.btnOK = new System.Windows.Forms.Button();
        this.btnCancel = new System.Windows.Forms.Button();
        this.label7 = new System.Windows.Forms.Label();
        this.label8 = new System.Windows.Forms.Label();
        this.label9 = new System.Windows.Forms.Label();
        this.cbxProvince = new System.Windows.Forms.ComboBox();
        this.cbxDistrict = new System.Windows.Forms.ComboBox();
        this.cbxWard = new System.Windows.Forms.ComboBox();
        this.SuspendLayout();
        // 
        // label1
        // 
        resources.ApplyResources(this.label1, "label1");
        this.label1.Name = "label1";
        // 
        // label2
        // 
        resources.ApplyResources(this.label2, "label2");
        this.label2.Name = "label2";
        // 
        // txtPlateNumber
        // 
        this.txtPlateNumber.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
        resources.ApplyResources(this.txtPlateNumber, "txtPlateNumber");
        this.txtPlateNumber.Name = "txtPlateNumber";
        this.txtPlateNumber.TextChanged += new System.EventHandler(this.txtOwnerAddress_TextChanged);
        // 
        // txtOwnerName
        // 
        resources.ApplyResources(this.txtOwnerName, "txtOwnerName");
        this.txtOwnerName.Name = "txtOwnerName";
        this.txtOwnerName.TextChanged += new System.EventHandler(this.txtOwnerAddress_TextChanged);
        // 
        // label3
        // 
        resources.ApplyResources(this.label3, "label3");
        this.label3.Name = "label3";
        // 
        // label4
        // 
        resources.ApplyResources(this.label4, "label4");
        this.label4.Name = "label4";
        // 
        // label5
        // 
        resources.ApplyResources(this.label5, "label5");
        this.label5.Name = "label5";
        // 
        // txtOwnerIDCard
        // 
        resources.ApplyResources(this.txtOwnerIDCard, "txtOwnerIDCard");
        this.txtOwnerIDCard.Name = "txtOwnerIDCard";
        // 
        // txtOwnerAddress
        // 
        resources.ApplyResources(this.txtOwnerAddress, "txtOwnerAddress");
        this.txtOwnerAddress.Name = "txtOwnerAddress";
        this.txtOwnerAddress.TextChanged += new System.EventHandler(this.txtOwnerAddress_TextChanged);
        // 
        // txtDescription
        // 
        resources.ApplyResources(this.txtDescription, "txtDescription");
        this.txtDescription.Name = "txtDescription";
        // 
        // chkIsBlacklist
        // 
        resources.ApplyResources(this.chkIsBlacklist, "chkIsBlacklist");
        this.chkIsBlacklist.Name = "chkIsBlacklist";
        this.chkIsBlacklist.UseVisualStyleBackColor = true;
        // 
        // btnOK
        // 
        resources.ApplyResources(this.btnOK, "btnOK");
        this.btnOK.Name = "btnOK";
        this.btnOK.UseVisualStyleBackColor = true;
        this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
        // 
        // btnCancel
        // 
        resources.ApplyResources(this.btnCancel, "btnCancel");
        this.btnCancel.Name = "btnCancel";
        this.btnCancel.UseVisualStyleBackColor = true;
        this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
        // 
        // label7
        // 
        resources.ApplyResources(this.label7, "label7");
        this.label7.Name = "label7";
        // 
        // label8
        // 
        resources.ApplyResources(this.label8, "label8");
        this.label8.Name = "label8";
        // 
        // label9
        // 
        resources.ApplyResources(this.label9, "label9");
        this.label9.Name = "label9";
        // 
        // cbxProvince
        // 
        this.cbxProvince.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        this.cbxProvince.FormattingEnabled = true;
        resources.ApplyResources(this.cbxProvince, "cbxProvince");
        this.cbxProvince.Name = "cbxProvince";
        this.cbxProvince.SelectedIndexChanged += new System.EventHandler(this.cbxProvince_SelectedIndexChanged);
        // 
        // cbxDistrict
        // 
        this.cbxDistrict.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        resources.ApplyResources(this.cbxDistrict, "cbxDistrict");
        this.cbxDistrict.FormattingEnabled = true;
        this.cbxDistrict.Name = "cbxDistrict";
        this.cbxDistrict.SelectedIndexChanged += new System.EventHandler(this.cbxDistrict_SelectedIndexChanged);
        // 
        // cbxWard
        // 
        this.cbxWard.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        resources.ApplyResources(this.cbxWard, "cbxWard");
        this.cbxWard.FormattingEnabled = true;
        this.cbxWard.Name = "cbxWard";
        this.cbxWard.SelectedIndexChanged += new System.EventHandler(this.cbxWard_SelectedIndexChanged);
        // 
        // frmVehicle
        // 
        resources.ApplyResources(this, "$this");
        this.Controls.Add(this.cbxWard);
        this.Controls.Add(this.cbxDistrict);
        this.Controls.Add(this.cbxProvince);
        this.Controls.Add(this.label9);
        this.Controls.Add(this.label8);
        this.Controls.Add(this.label7);
        this.Controls.Add(this.btnCancel);
        this.Controls.Add(this.btnOK);
        this.Controls.Add(this.chkIsBlacklist);
        this.Controls.Add(this.txtDescription);
        this.Controls.Add(this.txtOwnerAddress);
        this.Controls.Add(this.txtOwnerIDCard);
        this.Controls.Add(this.label5);
        this.Controls.Add(this.label4);
        this.Controls.Add(this.label3);
        this.Controls.Add(this.txtOwnerName);
        this.Controls.Add(this.txtPlateNumber);
        this.Controls.Add(this.label2);
        this.Controls.Add(this.label1);
        this.MaximizeBox = false;
        this.MinimizeBox = false;
        this.Name = "frmVehicle";
        this.Load += new System.EventHandler(this.frmVehicle_Load);
        this.ResumeLayout(false);
        this.PerformLayout();

	}
}
